package cn.itsource.org.domain;

import cn.itsource.basic.domain.BaseDomain;
import cn.itsource.basic.domain.CreatePassword;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotBlank;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "t_employee")
@ApiModel(value = "员工实体类")
public class Employee extends BaseDomain implements CreatePassword {

    //登录帐号
    private String username;
    //邮箱
    private String email;
    //手机号
    private String phone;
    //盐值
    private String salt;
    //登录密码
    @NotBlank(message = "密码不能为空")
    private String password;
    //确认密码
    @Transient
    @NotBlank(message = "密码不能为空")
    private String comfirmPassword;
    //年龄
    private Integer age;
    //1待审核；2审核通过；3激活成功；4审核驳回（关闭）
    private Integer state;
    //关联的部门ID
    private Long departmentId;
    //关联的登录信息ID
    private Long logininfoId;
    //关联的店铺ID
    private Long shopId;
    //员工的上级ID
    private Long parentId;
    //员工的上级经理ID
    private Long managerId;

}
